Skip to content

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Jan 2, 2023

Fixes #106226.
Fixes #105742.
Fixes #105737.
Fixes #105334.
Fixes #96287.

In this case, it's ok to replace the panic with rustc_error::raise because the compiler provided us with a Error.

r? @notriddle

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 2, 2023
@GuillaumeGomez GuillaumeGomez changed the title Fix rustdoc ice typedef type mismatch Fix rustdoc ICE on bad typedef with mismatching types Jan 2, 2023
@matthiaskrgr
Copy link
Member

matthiaskrgr commented Jan 2, 2023

@GuillaumeGomez
Copy link
Member Author

Good point! I'll check them out.

@GuillaumeGomez GuillaumeGomez force-pushed the fix-rustdoc-ice-typedef-type-mismatch branch from 9b0ea7d to d117cbe Compare January 2, 2023 13:30
@GuillaumeGomez
Copy link
Member Author

Only two issues are still panicking but all the others are fixed by this PR, so it's always that done. :)

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the fix-rustdoc-ice-typedef-type-mismatch branch from d117cbe to eadbdff Compare January 2, 2023 13:40
@klensy
Copy link
Contributor

klensy commented Jan 2, 2023

Q: Why rustdoc even invoked on code, that didn't compile itself and try to fix things by himself?

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

I see at least one answer to that: more evaluations are performed in later rustdoc stages (in the clean pass). Before that, it didn't trigger the error, making if tcx.sess.diagnostic().has_errors_or_lint_errors().is_some() or tcx.sess.abort_if_errors() not stopping rustdoc, allowing it to get the Error variant.

@GuillaumeGomez GuillaumeGomez force-pushed the fix-rustdoc-ice-typedef-type-mismatch branch from eadbdff to c156773 Compare January 2, 2023 13:49
@notriddle
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jan 2, 2023

📌 Commit c156773 has been approved by notriddle

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 2, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 3, 2023
…mpiler-errors

Rollup of 8 pull requests

Successful merges:

 - rust-lang#95985 (Add PhantomData marker to Context to make Context !Send and !Sync)
 - rust-lang#104298 (Add notes and examples about non-intuitive `PathBuf::set_extension` behavior)
 - rust-lang#105558 (Reduce HIR debug output)
 - rust-lang#106315 (Cleanup `mingw-tidy` docker job)
 - rust-lang#106354 (Rustdoc-Json: Report discriminant on all kinds of enum variant.)
 - rust-lang#106366 (Fix rustdoc ICE on bad typedef with mismatching types)
 - rust-lang#106376 (Update books)
 - rust-lang#106383 (Document some of the AST nodes)

Failed merges:

 - rust-lang#106356 (clean: Remove `ctor_kind` from `VariantStruct`.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ea3c4d8 into rust-lang:master Jan 3, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 3, 2023
@GuillaumeGomez GuillaumeGomez deleted the fix-rustdoc-ice-typedef-type-mismatch branch January 3, 2023 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
7 participants